import request from '@/utils/request'

// 根据主键ID查询热销特惠数据
export function hotSaledetail(hotSaleId) {
  return request({
    url: '/gscloud_product/product/hotSale/getById',
    method: 'get',
    params: {
      hotSaleId
    }
  })
}

// 根据参数查询热销特惠列表和分页数据
export function page(pageParam) {
  return request({
    url: '/gscloud_product/product/hotSale/page',
    method: 'get',
    params: pageParam
  })
}

//新增热销特惠
export function save(data) {
  return request({
    url: '/gscloud_product/product/hotSale/save',
    method: 'post',
    data
  })
}

//热销启用
export function change_status(data) {
  return request({
    url: '/gscloud_product/product/hotSale/hotSaleStatus',
    method: 'put',
    data
  })
}
